In a conventional stroke amount detecting device, a magnetic sensor element moves relative to a magnet as a magnetic field generation member in accordance with a linear movement of a stroking object. The amount of stroke of the object is detected based on an output signal generated from the magnetic sensor element. For example, JP2000-180114A, which corresponds to U.S. Pat. No. 6,211,668, and JP2008-45919A describe inventions for improving linearity of output signals relative to the stroke amount.
In a magnetic position sensor described in JP2000-180114A, tapered magnets are opposed to each other in a direction parallel to a line along which a magnetic sensor element moves. Also, the opposed tapered magnets are provided on both sides of a stroke range of the magnetic sensor element, such as on a first side and a second side of the stroke range. Thus, a distance between the tapered magnets, that is, a width of an air gap between tapered surfaces increases toward a middle position of the stroke range and reduces as a function of distance from the middle position. The tapered magnets on the first side of the stroke range are magnetized in the same direction. Also, the tapered magnets on the second side of the stroke range are magnetized in the same direction, but are magnetized in an opposite direction as the tapered magnets on the first side. In such a construction, a magnetic flux density detected by a magnetic sensor element continuously changes in a manner of strong, weak, strong, as the magnetic sensor element moves relative to the tapered magnets. Further, the directions of the magnetic fluxes are opposite between the first side and the second side.
In a position detection device described in JP2008-45919A, magnets are arranged on both sides of a stroke range, such as on a first side and a second side of the stroke range. Further, on the first side of the stroke range, the magnets are opposed to each other in a direction perpendicular to a stroke direction. Likewise, on the second side of the stroke range, the magnets are opposed to each other in the direction perpendicular to the stroke direction. The opposed magnets are magnetized in the same direction, but the magnets on the first side and the magnets on the second side are magnetized in different directions. Thus, the directions of the magnetic fluxes are opposite between the first side and the second side of the stroke range.
In the magnetic position sensor described in JP2000-180114A, if the magnets are arranged such that the tapered surfaces are unevenly angled relative to a line along which the magnetic sensor element moves due to a machining error or an assembling error, detection errors may occur.
Further, in the case where the magnets opposed in the direction perpendicular to the stroke direction are magnetized in the same direction, as in the magnetic position sensor described in JP2000-180114A and the position detection device described in JP2008-45919A, if the position of the magnetic sensor element is displaced from the stroke direction, such as in the direction perpendicular to the stroke direction, a detecting magnetic flux density varies, resulting in detection errors. Therefore, robustness will be insufficient. That is, a property that a system characteristic maintains a current state against disturbances and errors in designing will be insufficient.